﻿@inject IStringLocalizer<AutoCompleteValueChanged> Localizer

<p>@Localizer["Description"]</p>
<div style="width: 200px;">
    <AutoComplete Items="@Items" ValueChanged="@OnValueChanged" />
</div>

@code {
    private readonly List<string> _items = new();
    private IEnumerable<string> Items => _items;
    private Task OnValueChanged(string val)
    {
        _items.Clear();
        _items.Add($"{val}@163.com");
        _items.Add($"{val}@126.com");
        _items.Add($"{val}@sina.com");
        _items.Add($"{val}@hotmail.com");
        return Task.CompletedTask;
    }
}
